
#include "TextArea.h"
#include "TextChangeEvent.h"

TextArea::TextArea(const char* name)
    : observer::Component(new Publisher()), name_(const_cast<char*>(name)) {}

void TextArea::Change()
{
  observer::Component::notify(new TextChangeEvent(this->name_, "文本域中的文字被改变"));
}

TextArea::~TextArea() = default;
